<script lang="ts" setup>

import { ref } from 'vue';
import {
  UserOutlined,
  VideoCameraOutlined,
  UploadOutlined,
  MenuUnfoldOutlined,
  MenuFoldOutlined,
} from "@ant-design/icons-vue";
const selectedKeys = ref<string[]>(["1"]);
const collapsed = ref<boolean>(false);
</script>
<template>
  <a-layout>
    <a-layout-sider v-model:collapsed="collapsed" :trigger="null" collapsible>
      <div class="logo" />
      <a-menu v-model:selectedKeys="selectedKeys" theme="dark" mode="inline" style="height:100vh;">
        <a-menu-item key="2">
          <video-camera-outlined />
          <span>
            <RouterLink to="./List"> 首页</RouterLink>
          </span>
        </a-menu-item>
        <a-menu-item key="3">
          <upload-outlined />
          <span>
            <RouterLink to="./organize">组织</RouterLink>
          </span>
        </a-menu-item>
        <a-menu-item key="4">
          <upload-outlined />
          <span>
            <RouterLink to="./role">角色</RouterLink>
          </span>
        </a-menu-item>
        <a-menu-item key="5">
          <upload-outlined />
          <span>
            <RouterLink to="./approval"> 审批</RouterLink>
          </span>
        </a-menu-item>
        <a-menu-item key="6">
          <upload-outlined />
          <span>
            <RouterLink to="./Permissions"> 权限</RouterLink>
          </span>
        </a-menu-item>
        <a-menu-item key="7">
          <upload-outlined />
          <span>
            <RouterLink to="./Attendance"> 考勤</RouterLink>
          </span>
        </a-menu-item>
        <a-menu-item key="8">
          <upload-outlined />
          <span>
            <RouterLink to="./salary"> 工资</RouterLink>
          </span>
        </a-menu-item>
        <a-menu-item key="9">
          <upload-outlined />
          <span>
            <RouterLink to="./social"> 社保</RouterLink>

          </span>
        </a-menu-item>
        <a-menu-item key="1">
          <upload-outlined />
          <span>
            <RouterLink to="./staff"> 员工</RouterLink>
          </span>
        </a-menu-item>
      </a-menu>
    </a-layout-sider>
    <a-layout>
      <a-layout-header style="background: #fff; padding: 0">
        <menu-unfold-outlined v-if="collapsed" class="trigger" @click="() => (collapsed = !collapsed)" />
        <menu-fold-outlined v-else class="trigger" @click="() => (collapsed = !collapsed)" />
        <!-- 面包屑 -->
        <div class="xie">
          <a-breadcrumb :routes="route">
            <template #itemRender="{ route, paths }">
              <router-link :to="`${basePath}/${paths.join('/')}`">

                {{ route.name }}
              </router-link>
            </template>
          </a-breadcrumb>
          <br />
          {{ $route.path }}
        </div>
      </a-layout-header>
      <a-layout-content
        :style="{ margin: '24px 16px', padding: '24px', background: '#fff', maxHeight: '620px', minHeight: '200px', overflow: 'auto' }">
        <RouterView></RouterView>
      </a-layout-content>
    </a-layout>
  </a-layout>
</template>

<style scoped>
#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: #1890ff;
}

#components-layout-demo-custom-trigger .logo {
  height: 32px;
  background: rgba(255, 255, 255, 0.3);
  margin: 16px;
}

.site-layout .site-layout-background {
  background: #fff;
}

.xie {
  position: fixed;
  top: -9%;
  left: 17%;
}
</style>
